#include <iostream>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

int n;
int x, y;
vector<pair<int, int>> v;
int score[5] = {0};

void count()
{
    int res = 0;
    for (auto &p1 : v)
    {
        pair<int, int> temp = p1;
        temp.first = p1.first + 1;
        if (find(v.begin(), v.end(), temp) == v.end())
        {
            continue;
        }
        temp.first = p1.first - 1;
        if (find(v.begin(), v.end(), temp) == v.end())
        {
            continue;
        }
        temp = p1;
        temp.second = p1.second + 1;
        if (find(v.begin(), v.end(), temp) == v.end())
        {
            continue;
        }
        temp.second = p1.second - 1;
        if (find(v.begin(), v.end(), temp) == v.end())
        {
            continue;
        }
        temp = p1;
        temp.first += 1;
        temp.second += 1;
        if (find(v.begin(), v.end(), temp) != v.end())
        {
            res++;
        }
        temp = p1;
        temp.first -= 1;
        temp.second -= 1;
        if (find(v.begin(), v.end(), temp) != v.end())
        {
            res++;
        }
        temp = p1;
        temp.first += 1;
        temp.second -= 1;
        if (find(v.begin(), v.end(), temp) != v.end())
        {
            res++;
        }
        temp = p1;
        temp.first -= 1;
        temp.second += 1;
        if (find(v.begin(), v.end(), temp) != v.end())
        {
            res++;
        }
        score[res]++;
        res = 0;
    }
    for (int i = 0; i < 5; i++)
    {
        cout << score[i] << endl;
    }
    system("pause");
}

int main()
{
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> x >> y;
        v.push_back(make_pair(x, y));
    }
    count();
}